// app.js
App({
  globalData: {
    // 全局状态管理方案
    hasLogin: false,
  },
  onLaunch() {
    const token = wx.getStorageSync("token");
    const user = wx.getStorageSync("user");
    if (token && user.nickname) {
      this.globalData.hasLogin = true;
    }
  },
});
